from rest_framework import serializers
from .models import ProjectHistory

class ProjectHistorySerializer(serializers.ModelSerializer):
    class Meta:
        model = ProjectHistory
        fields = '__all__'
        extra_kwargs = {
            'project': {'required': True},
            'project_snapshot': {'required': True},
            'canvas_snapshot': {'required': True},
            'element_snapshot': {'required': True}
        }